package com.spzx.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spzx.user.domain.Region;
import com.spzx.user.mapper.UserRegionMapper;
import com.spzx.user.service.UserRegionService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserRegionServiceImpl extends ServiceImpl<UserRegionMapper,Region> implements UserRegionService {
    @Override
    public List<Region> treeSelect(String parentCode) {
        QueryWrapper<Region> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("parent_code",parentCode);
        return baseMapper.selectList(queryWrapper);
    }
}
